import request from '@/utils/request'

// 查询回避人员列表
export function listChalllenger(query) {
  return request({
    url: '/vote/challlenger/list',
    method: 'get',
    params: query
  })
}

// 查询回避人员详细
export function getChalllenger(id) {
  return request({
    url: '/vote/challlenger/' + id,
    method: 'get'
  })
}

// 新增回避人员
export function addChalllenger(data) {
  return request({
    url: '/vote/challlenger',
    method: 'post',
    data: data
  })
}

// 修改回避人员
export function updateChalllenger(data) {
  return request({
    url: '/vote/challlenger',
    method: 'put',
    data: data
  })
}

// 删除回避人员
export function delChalllenger(id) {
  return request({
    url: '/vote/challlenger/' + id,
    method: 'delete'
  })
}

// 导出回避人员
export function exportChalllenger(query) {
  return request({
    url: '/vote/challlenger/export',
    method: 'get',
    params: query
  })
}